package com.futong.ft.common.configure;

import com.futong.ft.common.handler.FTAccessDeniedHandler;
import com.futong.ft.common.handler.FTAuthExceptionEntryPoint;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

public class FTAuthExceptionConfigure {

    @Bean
    @ConditionalOnMissingBean(name = "accessDeniedHandler")
    public FTAccessDeniedHandler accessDeniedHandler() {
        return new FTAccessDeniedHandler();
    }

    @Bean
    @ConditionalOnMissingBean(name = "authenticationEntryPoint")
    public FTAuthExceptionEntryPoint authenticationEntryPoint() {
        return new FTAuthExceptionEntryPoint();
    }



}
